class DirectionalRenderer : public IBlockRenderer
{
public:
	ITexture *Texture;
	Point2i TopTexturePosition;
	Point2i SideTexturePosition;
	Point2i DirectionTexturePosition;

	DirectionalRenderer(ITexture *texture, const Point2i &top, const Point2i &side, const Point2i &dir)
	{
		Texture = texture;
		TopTexturePosition = top;
		SideTexturePosition = side;
		DirectionTexturePosition = dir;
	}

	virtual int GetTypeData(const int &data) { return 0; }

	virtual void Render(Schematic *schematic, RendererBase *renderer, const Block &block, const Point3i &position)
	{
		Box box(Texture);
		box.SetAll(SideTexturePosition).SetTop(TopTexturePosition).SetBottom(TopTexturePosition);

		switch (block.Data)
		{
		case 2:
			box.SetNorth(DirectionTexturePosition);
			break;
		case 3:
			box.SetSouth(DirectionTexturePosition);
			break;
		case 4:
			box.SetWest(DirectionTexturePosition);
			break;
		case 5:
			box.SetEast(DirectionTexturePosition);
			break;
		}

		renderer->Draw(box);
	}
};